﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PluginBase
{
    public enum PluginMessageType
    {
        /// <summary>
        /// 错误信息
        /// </summary>
        ErrorInfo = -1,

        UnKnown = 0,
        /// <summary>
        /// 打印
        /// </summary>
        Print = 1,
        /// <summary>
        /// 查询打印机状态
        /// </summary>
        QueryState = 2,

        /// <summary>
        /// 打印完成
        /// </summary>
        PrintComplete = 3,

        /// <summary>
        /// 添加打印模板
        /// </summary>
        AddPrintTemplate = 4,

        /// <summary>
        /// 重置打印模板
        /// </summary>
        ResetPrintTemplate = 5,

        /// <summary>
        /// 删除打印模板
        /// </summary>
        RemovePrintTemplate = 6,

        /// <summary>
        /// 清除打印模板
        /// </summary>
        CleanPrintTemplate = 7,

        /// <summary>
        /// 重启打印机
        /// </summary>
        Reset = 8,

        /// <summary>
        /// 发送其他命令
        /// </summary>
        SendOtherCommand = 9,

        One2OneResponse=100,
        /// <summary>
        /// 1比1
        /// </summary>
        One2OneByBase64=101,

        One2OneByUrl=102,

        /// <summary>
        /// 添加黑名单
        /// </summary>
        AddBlank=103,

        /// <summary>
        /// 移除黑名单
        /// </summary>
        RemoveBlank=104,

        /// <summary>
        /// 检测人脸特征
        /// </summary>
        DetectiveFaceFeature=105,

    }

    public enum PrinterType
    {
        UnKnown = 0,
        TSC = 1,
        TSCUSB = 2,
    }

    public class PluginMessageBase
    {

        #region 构造函数

        public PluginMessageBase() { }

        public PluginMessageBase(string messageBody, string taskid)
        {
            _messageBody = messageBody;
            _taskId = taskid;
        }

        #endregion
        #region 变量

        protected PluginMessageType _pluginMessageType = PluginMessageType.UnKnown;

        protected PrinterType _printerType = PrinterType.TSC;

        protected string _messageBody;


        private string _sourceId;
        private string _taskId;

        #endregion

        #region 属性

        public PrinterType PrinterType
        {
            set { _printerType = value; }
            get { return _printerType; }
        }

        public PluginMessageType PluginMessageType
        {
            set { _pluginMessageType = value; }
            get { return _pluginMessageType; }

        }

        public string MessageBody
        {
            get { return _messageBody; }
            set { _messageBody = value; }
        }

        public string TaskId
        {
            get { return _taskId; }
            set { _taskId = value; }
        }

        public string SourceId
        {
            get { return _sourceId; }
            set { _sourceId = value; }
        }

        


        #endregion

       
    }
}
